package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import com.ticket.sass.common.entity.tenant.enums.OrderTicketStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author ywb
 * @since 2024-03-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("order_tickets")
@ApiModel(value="OrderTicketsEntity对象")
public class OrderTicketEntity implements Serializable {
    @ApiModelProperty(value = "影票订单ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    @ApiModelProperty(value = "订单ID")
    private Long orderId;
    
    @ApiModelProperty(value = "购票数量")
    private Integer ticketCount;
    
    @ApiModelProperty(value = "场次ID")
    private Long filmScheduleId;
    
    @ApiModelProperty(value = "票价方案ID")
    private Long priceSchemeId;
    
    @ApiModelProperty(value = "出票状态")
    private OrderTicketStatus ticketStatus;

    @ApiModelProperty(value = "售票系统单号")
    private String ticketOrderNo;
    

    
    @ApiModelProperty(value = "出票价")
    private BigDecimal ticketPrice;
    
    @ApiModelProperty(value = "取票码")
    private String takeCode;
    
    @ApiModelProperty(value = "订单备注")
    private String remark;
    
    @ApiModelProperty(value = "锁座记录ID")
    private Long seatLockId;
    

    
    @ApiModelProperty(value = "用户ID")
    private Long userId;
    
    @ApiModelProperty(value = "影院ID")
    private Long cinemaId;
    
    @ApiModelProperty(value = "租户ID")
    private Long tenantId;
    
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    public LocalDateTime createdAt;
    
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    public LocalDateTime updatedAt;
    
    @TableField(select = false)
    @ApiModelProperty(value = "删除时间")
    @TableLogic(value = "null", delval = "now()")
    public LocalDateTime deletedAt;
    
    @ApiModelProperty(value = "影片名")
    @TableField(exist = false)
    private String filmName;
    
    @ApiModelProperty(value = "影片语言")
    @TableField(exist = false)
    private String filmLang;
    
    @ApiModelProperty(value = "影片版本")
    @TableField(exist = false)
    private String filmVersion;
    
    @ApiModelProperty(value = "影厅名")
    @TableField(exist = false)
    private String hallName;
    
    @ApiModelProperty(value = "场次开始时间")
    @TableField(exist = false)
    private LocalDateTime sessionStartTime;
    
    @ApiModelProperty(value = "场次结束时间")
    @TableField(exist = false)
    private LocalDateTime sessionEndTime;
    
    @TableField(exist = false)
    @ApiModelProperty(value = "订单号")
    private String orderNo;
    
    @TableField(exist = false)
    @ApiModelProperty(value = "支付价格")
    private BigDecimal payPrice;
    
    @TableField(exist = false)
    @ApiModelProperty(value = "支付状态")
    private Short payStatus;
    
    @TableField(exist = false)
    @ApiModelProperty(value = "支付类型")
    private Short payType;
    
    @TableField(exist = false)
    @ApiModelProperty(value = "支付时间")
    private LocalDateTime payTime;
    
    @TableField(exist = false)
    @ApiModelProperty(value = "是否使用优惠券")
    private Boolean useCoupon;
    
    @TableField(exist = false)
    @ApiModelProperty(value = "订单创建时间")
    private LocalDateTime orderCreatedAt;

    @TableField(exist = false)
    private List<OrderTicketDetailEntity> orderTicketDetailList;

    @TableField(exist = false)
    private SeatLockEntity seatLock;

    @TableField(exist = false)
    private OrderEntity order;

    @TableField(exist = false)
    private FilmScheduleEntity schedule;

    @TableField(exist = false)
    private List<SeatLockMapEntity> seatLockMapList;

    @TableField(exist = false)
    private OrderTicketLaterPayEntity orderTicketLaterPay;
}
